CustomiOSApi 1.09
/Users/user/Documents/sviluppo/CustomiOSApi/CustomiOSApi/CustomiOSApi/CustomPrinter.h
1//
2// CustomPrinter.h
3// CustomiOSApi
4//
5// Created by CUSTOM on 03/07/13.
6// Copyright (c) 2013 CUSTOM. All rights reserved.
7//
8
9#ifndef CUSTOMPRINTER_H_
10#define CUSTOMPRINTER_H_
11
12#import <Foundation/Foundation.h>
13#import "CustomPrinterStatus.h"
14#import "PrinterFont.h"
15#import <UIKit/UIKit.h>
16
20@interface CustomPrinter : NSObject
21{
22 @public
23
28 {
45 };
46
47 //************************************************************************************************
48 // IMAGE SCALE
49 //************************************************************************************************
50
55 {
68 };
69
70 //************************************************************************************************
71 // IMAGE ALIGN / JUSTIFICATION
72 //************************************************************************************************
73
78 {
91 };
92
93 //************************************************************************************************
94 // CUT
95 //************************************************************************************************
96
101 {
110 };
111
112 //************************************************************************************************
113 // EJECT
114 //************************************************************************************************
115
120 {
129 };
130
131 //************************************************************************************************
132 // BARCODE TYPE
133 //************************************************************************************************
134
139 {
180 };
181
182 //************************************************************************************************
183 // BARCODE 2D TYPE
184 //************************************************************************************************
185
190 {
195
200
205
210
215
220
221 };
222
223 //************************************************************************************************
224 // BARCODE HRI TYPE
225 //************************************************************************************************
226
231 {
248 };
249
250 //************************************************************************************************
251 // BARCODE ALIGN / JUSTIFICATION
252 //************************************************************************************************
253
258 {
271 };
272
273 @protected
274
275 @private
276}
277
278//***********************************************
279// COMMON FUNCTIONS
280//***********************************************
281
287- (Boolean) IsPrinterOnline:(NSError**)error;
288
294- (NSInteger) GetPrinterId:(NSError**)error;
295
301- (NSString*) GetFirmwareVersion:(NSError**)error;
302
307- (NSString*) GetAPIVersion;
308
314- (NSData*) GetPrinterFullStatusBuffer:(NSError**)error;
315
321- (CustomPrinterStatus*) GetPrinterFullStatus:(NSError**)error;
322
327- (NSString*) GetPrinterName;
328
333- (NSInteger) GetPageWidth;
334
340- (NSInteger) GetReadTimeout:(NSError**)error;
341
347- (void) SetReadTimeout:(NSInteger)msecs :(NSError**)error;
348
354- (NSInteger) GetWriteTimeout:(NSError**)error;
355
361- (void) SetWriteTimeout:(NSInteger)msecs :(NSError**)error;
362
367- (void) Close:(NSError**)error;
368
380
385- (void) ClearReadBuffer:(NSError**)error;
386
392- (NSData *) ReadData:(NSError**)error;
393
399- (void) WriteData:(NSData *)data :(NSError**)error;
400
406- (void) Feed:(NSInteger)nFeeds :(NSError**)error;
407
418- (void) Cut:(enum CutType)cutType :(NSError**)error;
419
430- (void) Eject:(enum EjectType)ejectType :(NSError**)error;
431
437- (void) Present:(NSInteger)presentMM :(NSError**)error;
438
439// <summary>
447- (void) PrintText:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
448
457- (void) PrintTextLF:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
458
465- (void) PrintText:(NSString*)text :(PrinterFont*)font :(NSError**)error;
466
473- (void) PrintTextLF:(NSString*)text :(PrinterFont*)font :(NSError**)error;
474
481- (void) PrintTextArrayLF:(NSArray*)textarray :(PrinterFont*)font :(NSError**)error;
482
488- (void) PrintText:(NSString*)text :(NSError**)error;
489
495- (void) PrintTextLF:(NSString*)text :(NSError**)error;
496
502- (void) PrintTextArrayLF:(NSArray*)textarray :(NSError**)error;
503
524- (void) PrintImage:(UIImage*)image :(NSInteger)leftAlign :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSError**)error;
525
531- (void) PrintImage:(UIImage*)image :(NSError**)error;
532
543- (void) PrintBarcodeText:(NSString*)brcText :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
544
555- (void) PrintBarcodeData:(NSData*)brcData :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
556
565- (void) PrintBarcode2DText:(NSString*)brcText :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
566
575- (void) PrintBarcode2DData:(NSData*)brcData :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
576
577@end
578
579#endif
This the container class to hold the printer status
Definition: CustomPrinterStatus.h:18
Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to p...
Definition: CustomPrinter.h:21
ImageJustification
Print Image Justification / Left Position
Definition: CustomPrinter.h:78
@ IMAGE_ALIGN_TO_CENTER
Definition: CustomPrinter.h:86
@ IMAGE_ALIGN_TO_LEFT
Definition: CustomPrinter.h:82
@ IMAGE_ALIGN_TO_RIGHT
Definition: CustomPrinter.h:90
ImageScale
Print Image Scale
Definition: CustomPrinter.h:55
@ IMAGE_SCALE_TO_FIT
Definition: CustomPrinter.h:63
@ IMAGE_SCALE_NONE
Definition: CustomPrinter.h:59
@ IMAGE_SCALE_TO_WIDTH
Definition: CustomPrinter.h:67
enum CommPortType GetPortType()
Returns the communication port type
Definition: CustomPrinter.m:20
EjectType
Eject Type
Definition: CustomPrinter.h:120
@ EJ_RETRACT
Definition: CustomPrinter.h:128
@ EJ_EJECT
Definition: CustomPrinter.h:124
NSString * GetAPIVersion()
Returns current API version
Definition: CustomPrinter.m:40
NSInteger GetPageWidth()
Returns the max printable width in pixels / dots
Definition: CustomPrinter.m:59
BarcodeJustification
Barcode Print Justification / Left Position
Definition: CustomPrinter.h:258
@ BARCODE_ALIGN_TO_LEFT
Definition: CustomPrinter.h:262
@ BARCODE_ALIGN_TO_CENTER
Definition: CustomPrinter.h:266
@ BARCODE_ALIGN_TO_RIGHT
Definition: CustomPrinter.h:270
BarcodeType
Barcode Type
Definition: CustomPrinter.h:139
@ BARCODE_TYPE_EAN13
Definition: CustomPrinter.h:155
@ BARCODE_TYPE_EAN8
Definition: CustomPrinter.h:159
@ BARCODE_TYPE_CODE39
Definition: CustomPrinter.h:163
@ BARCODE_TYPE_UPCA
Definition: CustomPrinter.h:147
@ BARCODE_TYPE_CODE32
Definition: CustomPrinter.h:179
@ BARCODE_TYPE_UPCE
Definition: CustomPrinter.h:151
@ BARCODE_TYPE_CODE93
Definition: CustomPrinter.h:171
@ BARCODE_TYPE_CODABAR
Definition: CustomPrinter.h:143
@ BARCODE_TYPE_CODE128
Definition: CustomPrinter.h:175
@ BARCODE_TYPE_ITF
Definition: CustomPrinter.h:167
BarcodeHriType
Barcode HRI Type
Definition: CustomPrinter.h:231
@ BARCODE_HRI_TOP
Definition: CustomPrinter.h:239
@ BARCODE_HRI_NONE
Definition: CustomPrinter.h:235
@ BARCODE_HRI_BOTTOM
Definition: CustomPrinter.h:243
@ BARCODE_HRI_TOPBOTTOM
Definition: CustomPrinter.h:247
CutType
Cut Type
Definition: CustomPrinter.h:101
@ CUT_TOTAL
Definition: CustomPrinter.h:105
@ CUT_PARTIAL
Definition: CustomPrinter.h:109
Barcode2DType
Barcode 2D Type
Definition: CustomPrinter.h:190
@ BARCODE_TYPE_PDF417
Definition: CustomPrinter.h:209
@ BARCODE_TYPE_MICROQRCODE
Definition: CustomPrinter.h:199
@ BARCODE_TYPE_DATAMATRIX
Definition: CustomPrinter.h:204
@ BARCODE_TYPE_MICROPDF417
Definition: CustomPrinter.h:214
@ BARCODE_TYPE_QRCODE
Definition: CustomPrinter.h:194
@ BARCODE_TYPE_AZTEC
Definition: CustomPrinter.h:219
CommPortType
Communication Port Type
Definition: CustomPrinter.h:28
@ COMMTYPE_NONE
Definition: CustomPrinter.h:44
@ COMMTYPE_BLUETOOTH
Definition: CustomPrinter.h:32
@ COMMTYPE_BLE
Definition: CustomPrinter.h:40
@ COMMTYPE_WIFI
Definition: CustomPrinter.h:36
NSString * GetPrinterName()
Returns name/type of the Printer
Definition: CustomPrinter.m:54
This the container class to hold various font attributes
Definition: PrinterFont.h:18